Page({
    pageLifetimes: {
        show() {
            if (typeof this.getTabBar === 'function' &&
                this.getTabBar()) {
                this.getTabBar().setData({
                    selected: 0
                })
            }
        }
    },

    data: {
        tabIndex: 0,

        imgslist: ["../image/1.jpg", "../image/2.jpg", "../image/3.jpg", "../image/4.jpg", "../image/5.jpg"],

        conlist: [
            {
                "title": "项目",
                tablist: [
                    {   
                        "id":1,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/1.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "id":2,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/2.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "tit": "水电费是个导航横滚",
                        "img": "../image/3.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "id":3,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/4.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "id":4,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/5.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },

                ]
            },
            {
                "title": "全部",
                tablist: [
                    {
                        "id":5,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/5.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "id":6,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/4.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "id":6,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/1.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "id":7,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/4.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "id":8,
                        "tit": "水电费是个导航横滚",
                        "img": "../image/4.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },

                ]
            },
            {
                "title": "工具",
                tablist: [
                    {
                        "tit": "水电费是个导航横滚",
                        "img": "../image/5.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "tit": "水电费是个导航横滚",
                        "img": "../image/1.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "tit": "水电费是个导航横滚",
                        "img": "../image/2.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "tit": "水电费是个导航横滚",
                        "img": "../image/4.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },
                    {
                        "tit": "水电费是个导航横滚",
                        "img": "../image/1.jpg",
                        "word": "从中选出是诶诶hi对对对大是大非"
                    },

                ]
            },
        ]
    },

    onTab(e) {
        console.log("e", e);
        const currentIndex = e.currentTarget.dataset.index;
        this.setData({
            tabIndex: currentIndex
        })
    },
    
 

})
